package main

import (
	"fmt"
	"time"
)

func awaitAdd(second int) func(...int) int {
	return func(nList ...int) (sum int) {
		time.Sleep(time.Second * time.Duration(second))
		sum = 0
		for _, i := range nList {
			sum += i
		}
		return sum
	}
}

func main() {
	n := time.Now()
	fmt.Println(awaitAdd(2)(1, 2, 3))
	t := time.Now().Sub(n)
	fmt.Println(t)
}
